SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[usp_UpdateApplyingRecordStudent]

	(
	@param_id INT,
	@param_resume_path NVARCHAR(100),
	@param_applicant_message TEXT,
	@param_update_time SMALLDATETIME,
	@param_user_update NVARCHAR(50)
	)

AS
	/* SET NOCOUNT ON */
	IF @param_resume_path=''
	BEGIN
		UPDATE dbo.JOL_Recruitment_ApplyingRecords
	SET
	applicant_message=@param_applicant_message,
	update_time=@param_update_time,
	user_update=@param_user_update
	WHERE 
	id=@param_id
	END
	
	ELSE
	Begin
	UPDATE dbo.JOL_Recruitment_ApplyingRecords
	SET
	resume_path=@param_resume_path,
	applicant_message=@param_applicant_message,
	update_time=@param_update_time,
	user_update=@param_user_update
	WHERE 
	id=@param_id
	END
	
	
	RETURN
GO
